package com.example.tree.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;


@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "publish_critic")
@ApiModel(value = "PublishCritic对象", description = "文章评论数据表")
public class PublishCritic {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "评论ID")
    @TableId(value = "critic_id", type = IdType.AUTO)
    private Long criticId;

    @ApiModelProperty(value = "评论内容")
    private String criticContent;

    @ApiModelProperty(value = "发布文章用户id")
    private String userId;

    @ApiModelProperty(value = "发布文章用户名称", hidden = true)
    private String userName;

    @ApiModelProperty(value = "发布文章用户头像", hidden = true)
    private String userImage;

    @ApiModelProperty(value = "评论人id")
    private String criticUserId;

    @ApiModelProperty(value = "评论人姓名")
    private String criticUserName;

    @ApiModelProperty(value = "评论人头像")
    private String criticUserAvatar;

    @ApiModelProperty(value = "文章id")
    private String articleId;

    @ApiModelProperty(value = "评论时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date criticTime;

    @ApiModelProperty(value = "1:删除 0未删除")
    private Integer deleteCritic;

    @ApiModelProperty(value = "点赞")
    private Long praise;

    @ApiModelProperty(value = "分享")
    private Long share;

    @ApiModelProperty(value = "浏览")
    private Long glance;

    @ApiModelProperty("评论父级id，被评论的id")
    private String parentId;

    @ApiModelProperty("评论父级code")
    private String parentCode;

    @ApiModelProperty(value = "1:一级 2：二级", hidden = true)
    private Integer type;

    @ApiModelProperty(value = "点赞状态 0：点赞1：取消点赞")
    private Long praiseStatus;

}
